public class RoundQueue<T>
extends java.lang.Object
implements java.io.Serializable
Constructor and Description |
---|
RoundQueue(int size) |
Modifier and Type | Method and Description |
---|---|
void |
addLast(T element)
add in last
|
void |
clear()
Clear all the saved data
|
T |
get(int index)
Returns the specified location value
|
T |
getFirst()
get the first element into the queue.
|
int |
gethead()
get the head of the queue
|
T |
getLast()
get the last element into queue
|
int |
gettail()
get the tail
|
int |
indexOf(T key)
get the element by the index,if don't have return -1.
|
boolean |
isEmpty()
empty
|
boolean |
isFull()
full
|
int |
realSize()
the size of queue
|
T |
removeFirst()
remove the first
|
public void addLast(T element)
element
- public T removeFirst()
public int realSize()
public boolean isEmpty()
public boolean isFull()
public void clear()
public T get(int index)
index
- public int indexOf(T key)
elementy
- The search elementpublic int gethead()
public int gettail()
public T getLast()
public T getFirst()